<template>
  <div>
    <h2>我是哥哥，我开的是{{car}}</h2>
    <button @click="changeCar">找了一个女富婆，给我换了一辆车</button>
  </div>
</template>

<script>
export default {
  name:"Gege",
  data(){
    return{
      car:"二手奇瑞QQ"
    }
  },
  methods: {
    changeCar(){
      this.car = "宾利小金人"
      this.$bus.$emit("getCar",this.car)
    }
  },
}
</script>

<style>

</style>